package com.servicesystem.servicesystem.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.servicesystem.servicesystem.entity.AliTtGoods;
import com.servicesystem.servicesystem.mapper.AliTtGoodsMapper;
import com.servicesystem.servicesystem.service.AliTtGoodsService;
import org.springframework.stereotype.Service;

@Service
public class AliTtGoodsServiceImp extends ServiceImpl<AliTtGoodsMapper, AliTtGoods> implements AliTtGoodsService {
    @Override
    public AliTtGoods getAliTtGoods(String skuId, String offerId) {
        QueryWrapper<AliTtGoods> aliTtGoodsQueryWrapper = new QueryWrapper<>();
        aliTtGoodsQueryWrapper.eq("cspec_id", skuId);
        aliTtGoodsQueryWrapper.eq("offer_id", offerId);
        return baseMapper.selectOne(aliTtGoodsQueryWrapper);
    }
}
